package com.ruoyi.cpsp.service;

import com.github.pagehelper.PageInfo;
import com.ruoyi.cpsp.domain.Employee;
import com.ruoyi.cpsp.domain.EmployeeEntity;
import com.ruoyi.cpsp.domain.TeamGroup;
import com.ruoyi.cpsp.domain.TeamGroupInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author neu.xiaojiacheng
 * @version 1.0
 * @date 2022/2/23 18:28
 */

public interface EmployeeService {
    boolean submitAllInfo(Employee employee);

    int updateByPrimaryKeySelective(Employee employee);

    List<EmployeeEntity> selectAll();

    List<EmployeeEntity> selectSelective(String department,
                                         Integer teamGroup,
                                         String employeeInfo);

    List<EmployeeEntity> selectInfoSelective(String department,String teamGroup, Integer isDirectProducer, String name);

    Boolean getIsDirectProducer(String idCard);

    EmployeeEntity selectByCard(String idCard);

    EmployeeEntity selectByJobNumber(String jobNumber);

    List<EmployeeEntity> selectEmployeesByTeamGroup(String teamGroup, String department);

    List<EmployeeEntity> selectEmployeesByDepartment(String department);

    List<String> selectCardByDepart(String department, Integer teamGroupId);

    EmployeeEntity getById(Integer id);

    List<EmployeeEntity> selectByName(String name, Integer state);

    // 条件查询职工信息
    PageInfo<EmployeeEntity> findEmployee(Integer pageNum, Integer pageSize, String departmentId, String teamGroupId, String name);

    // 修改职工班组和岗位类型
    Integer updateEmployeeTeamAndPosition(Integer employeeId, String teamGroupName, String positionType);

    //修改职工是否在岗45天
    Integer updateEmployeeIs45Days(Integer employeeId, Integer is45Days);

    //查询班组信息及分主管的姓名
    List<TeamGroupInfo> findTeamGroupAndName(String departmentId);

    //修改班组的主管id，分管id
    Integer updateTeamGroup(Integer id,String teamGroupName, String branchManagerId, String mainManagerId);

    //添加班组信息
    Integer addTeamGroup(TeamGroup teamGroup);

    // 根据班组id获得一行数据
    TeamGroup selectById(Integer id);

    //根据班组id删除班组
    Integer deleteTeamGroup(Integer id);

    Integer updateTeamGroup(Integer teamGroupId);

    // 根据绩效值查找员工列表——首页
    List<EmployeeEntity> selectEmployeeByValue(double perValue);

    boolean insertEmployee(Employee employee);

    boolean deleteEmployee(Integer id);

    boolean updateEmployee(Employee employee);

    boolean updateGroupBatch(List<Integer> ids, String teamGroupId);

    boolean transDepartment(Integer id, String departmentId);

    Integer updateEmployeeState(Integer id, Integer state);
}
